The Tab View Component > FTabView.removeItemAt() |
FTabView.removeItemAt()
Availability
Flash Player 6.
Usage
myTab_tbv.removeItemAt (index)
Parameters
index A number specifying the index of the section that should be removed.
Returns
Nothing
Description
Removes the tab at the specified index. Any data associated with the tab will be lost. Any items above the remove index, will have their index reduced by 1.
Example
The tab_example1.fla example file contains an example of using this method.
The following code adds two tabs to the component, removes the first, and then traces the length and label of the first tab.
myTab_tbv.addItem( "Tab1" ); myTab_tbv.addItem( "Tab2" ); myTab_tbv.removeItemAt( 0 ); trace( "Label: " + myTab_tbv.getItemAt( 0 ).label ); //traces "Label: Tab2" trace( "Length: " + myTab_tbv.getLength( ) ); //traces "Length: 1"
See also